package com.lancoo.cvas.mapper;

import com.lancoo.cvas.config.MybatisRedisCache;
import com.lancoo.cvas.entity.PeriodScheme;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

/**
 * 课时方案，每种方案分别对应不同的节次时间
 * 
 * @author liufeng
 * @email 1037383243@qq.com
 * @date 2023-12-04 11:54:01
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface PeriodSchemeMapper extends BaseMapper<PeriodScheme> {

    int addBatch(@Param("periodSchemeCollection") Collection<PeriodScheme> periodSchemeCollection);

    List<PeriodScheme> getTermPeriodScheme(String schoolId, String term);

    Integer fixPeriodSchemeCheck(Integer taskId, String schoolId, String term, String dayNum, List<Integer> period);
}
